Dynomotion

Group: DynoMotion Message: 15315 From: AS Mechatronic Date: 1/16/2018
Subject: Fwd: Automatic Tool Changer on CNC Lathe retrofiting
Hi..

I use KFLOP + KANALOG + KONNECT to replace the controller on my old CNC's lathe. This lathe has turret with 10 Tool's Slot.
I want to run Automatic Toll Changer with command M6 Tx (x = number of tool). The turret works by hydraulic, to turn it only require one output (bit 150) that will enables the hydraulic's solenoid valve. A solenoid valve will move the plate to unclamp-> turning to no. tool destination-> clamp. The hydraulic mechanism allows only one-way rotation.
On the back of the turret, there is rotary encoder (2500 pulse/rotation), supposed for detect the position when the turret was turning, I connect the A signal to Input bit 1054 and B signal to Input bit 1055.
There is one switch on the back of the turret for detect when the plate on 'clamp' position, I connect the switch to Input bit 1051

The working order of the Automatic Tool changer is as follows:
- M6 Tx commands from Gcode program or MDI
- Axis X and Axis Z move back toward a safe position
- Output bit 150 ON
- Wait time for t second -> t corresponds to the moving distance from the current tool to the destination tool. The time required for clamp and unclamp 0.5s and time required for  turn each slot is 0.2 second. For example, to change from tool #1 to tool #3, the total time required will be 0.9s.
- Output bit 150 OFF
- Axis X and Axis Z move forward to continue the next program.

I also want KFLOP to remember the last position of tool's number that's used when the machine is turned on after it is turned off.

Please help me the example of C program to do the above work.
Sorry, I'm just an electrician, and just learned about the C program.

Really very grateful for your help.

Regards,

asmec


Group: DynoMotion Message: 15318 From: Tom Kerekes Date: 1/16/2018
Subject: Re: Fwd: Automatic Tool Changer on CNC Lathe retrofiting
Hi asmec,

I think you will need to connect the encoder to a hardware Encoder input.  Does it have differentials outputs?  See:
http://dynomotion.com/faq.html#Encoders

Have you studied this to see how much you can understand?
http://www.dynomotion.com/wiki/index.php?title=Tool_Changer_-_router_linear_4_Tools_-_C_Program

Can you identify the Functions?
http://www.dynomotion.com/wiki/index.php?title=KFLOP_C_Programs#C_Functions_.28Subroutines.29

Regards
TK

On 1/16/2018 4:04 AM, AS Mechatronic as.mechatronic@... [DynoMotion] wrote:
 
Hi..

I use KFLOP + KANALOG + KONNECT to replace the controller on my old CNC's lathe. This lathe has turret with 10 Tool's Slot.
I want to run Automatic Toll Changer with command M6 Tx (x = number of tool). The turret works by hydraulic, to turn it only require one output (bit 150) that will enables the hydraulic's solenoid valve. A solenoid valve will move the plate to unclamp-> turning to no. tool destination-> clamp. The hydraulic mechanism allows only one-way rotation.
On the back of the turret, there is rotary encoder (2500 pulse/rotation), supposed for detect the position when the turret was turning, I connect the A signal to Input bit 1054 and B signal to Input bit 1055.
There is one switch on the back of the turret for detect when the plate on 'clamp' position, I connect the switch to Input bit 1051

The working order of the Automatic Tool changer is as follows:
- M6 Tx commands from Gcode program or MDI
- Axis X and Axis Z move back toward a safe position
- Output bit 150 ON
- Wait time for t second -> t corresponds to the moving distance from the current tool to the destination tool. The time required for clamp and unclamp 0.5s and time required for  turn each slot is 0.2 second. For example, to change from tool #1 to tool #3, the total time required will be 0.9s.
- Output bit 150 OFF
- Axis X and Axis Z move forward to continue the next program.

I also want KFLOP to remember the last position of tool's number that's used when the machine is turned on after it is turned off.

Please help me the example of C program to do the above work.
Sorry, I'm just an electrician, and just learned about the C program.

Really very grateful for your help.

Regards,

asmec



Group: DynoMotion Message: 15322 From: AS Mechatronic Date: 1/18/2018
Subject: Re: Fwd: Automatic Tool Changer on CNC Lathe retrofiting
Attachments :
    Hi Tom,

    Thank you for suggestion,
    I check the encoder, yes it has differentials output. But temporary I don't connect it to KANALOG. 

    Everytime I type : for example Tn M6, with 2 or 3 or 4 etc,  the same bellow message always appear : 

     
    I checked on the KMotion console, it show some information as follow :


    Before, I create a file in C:\Temp\ToolChangerData.txt, for save the last tool, and on the file I wrote 1,  is it correct ?

    It's looked like the program can not read the number of desire tool Tn.
    I dont know where is a mistake, probably it's jumped ?  .

    Much appreciate for your advice..

    Regards  
    asmec

    On 17 January 2018 at 10:51, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
     

    Hi asmec,

    I think you will need to connect the encoder to a hardware Encoder input.  Does it have differentials outputs?  See:
    http://dynomotion.com/faq. html#Encoders

    Have you studied this to see how much you can understand?
    http://www.dynomotion.com/ wiki/index.php?title=Tool_ Changer_-_router_linear_4_ Tools_-_C_Program

    Can you identify the Functions?
    http://www.dynomotion.com/ wiki/index.php?title=KFLOP_C_ Programs#C_Functions_. 28Subroutines.29

    Regards
    TK



    On 1/16/2018 4:04 AM, AS Mechatronic as.mechatronic@... [DynoMotion] wrote:
     
    Hi..

    I use KFLOP + KANALOG + KONNECT to replace the controller on my old CNC's lathe. This lathe has turret with 10 Tool's Slot.
    I want to run Automatic Toll Changer with command M6 Tx (x = number of tool). The turret works by hydraulic, to turn it only require one output (bit 150) that will enables the hydraulic's solenoid valve. A solenoid valve will move the plate to unclamp-> turning to no. tool destination-> clamp. The hydraulic mechanism allows only one-way rotation.
    On the back of the turret, there is rotary encoder (2500 pulse/rotation), supposed for detect the position when the turret was turning, I connect the A signal to Input bit 1054 and B signal to Input bit 1055.
    There is one switch on the back of the turret for detect when the plate on 'clamp' position, I connect the switch to Input bit 1051

    The working order of the Automatic Tool changer is as follows:
    - M6 Tx commands from Gcode program or MDI
    - Axis X and Axis Z move back toward a safe position
    - Output bit 150 ON
    - Wait time for t second -> t corresponds to the moving distance from the current tool to the destination tool. The time required for clamp and unclamp 0.5s and time required for  turn each slot is 0.2 second. For example, to change from tool #1 to tool #3, the total time required will be 0.9s.
    - Output bit 150 OFF
    - Axis X and Axis Z move forward to continue the next program.

    I also want KFLOP to remember the last position of tool's number that's used when the machine is turned on after it is turned off.

    Please help me the example of C program to do the above work.
    Sorry, I'm just an electrician, and just learned about the C program.

    Really very grateful for your help.

    Regards,

    asmec




    Group: DynoMotion Message: 15324 From: Tom Kerekes Date: 1/18/2018
    Subject: Re: Fwd: Automatic Tool Changer on CNC Lathe retrofiting
    Hi asmec,

    Note: the line shown below in the C Program defines which persist variable the program expects KMotionCNC to place the Tool Slot number to load.  The M6 command in KMotionCNC Tool Setup should be configured with the same Var Parameter to match.
    define TOOL_VAR 9          // Tool changer desired new tool Var
    HTH
    Regards
    TK

    On 1/18/2018 4:19 AM, AS Mechatronic as.mechatronic@... [DynoMotion] wrote:
     
    Hi Tom,

    Thank you for suggestion,
    I check the encoder, yes it has differentials output. But temporary I don't connect it to KANALOG. 

    Everytime I type : for example Tn M6, with 2 or 3 or 4 etc,  the same bellow message always appear : 

     
    I checked on the KMotion console, it show some information as follow :


    Before, I create a file in C:\Temp\ToolChangerData.txt, for save the last tool, and on the file I wrote 1,  is it correct ?

    It's looked like the program can not read the number of desire tool Tn.
    I dont know where is a mistake, probably it's jumped ?  .

    Much appreciate for your advice..

    Regards  
    asmec

    On 17 January 2018 at 10:51, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
     

    Hi asmec,

    I think you will need to connect the encoder to a hardware Encoder input.  Does it have differentials outputs?  See:
    http://dynomotion..com/faq. html#Encoders

    Have you studied this to see how much you can understand?
    http://www.dynomotion.com/ wiki/index.php?title=Tool_ Changer_-_router_linear_4_ Tools_-_C_Program

    Can you identify the Functions?
    http://www.dynomotion.com/ wiki/index.php?title=KFLOP_C_ Programs#C_Functions_. 28Subroutines.29

    Regards
    TK



    On 1/16/2018 4:04 AM, AS Mechatronic as.mechatronic@gmail..com [DynoMotion] wrote:
     
    Hi..

    I use KFLOP + KANALOG + KONNECT to replace the controller on my old CNC's lathe. This lathe has turret with 10 Tool's Slot.
    I want to run Automatic Toll Changer with command M6 Tx (x = number of tool). The turret works by hydraulic, to turn it only require one output (bit 150) that will enables the hydraulic's solenoid valve. A solenoid valve will move the plate to unclamp-> turning to no. tool destination-> clamp. The hydraulic mechanism allows only one-way rotation.
    On the back of the turret, there is rotary encoder (2500 pulse/rotation), supposed for detect the position when the turret was turning, I connect the A signal to Input bit 1054 and B signal to Input bit 1055.
    There is one switch on the back of the turret for detect when the plate on 'clamp' position, I connect the switch to Input bit 1051

    The working order of the Automatic Tool changer is as follows:
    - M6 Tx commands from Gcode program or MDI
    - Axis X and Axis Z move back toward a safe position
    - Output bit 150 ON
    - Wait time for t second -> t corresponds to the moving distance from the current tool to the destination tool. The time required for clamp and unclamp 0.5s and time required for  turn each slot is 0.2 second. For example, to change from tool #1 to tool #3, the total time required will be 0.9s.
    - Output bit 150 OFF
    - Axis X and Axis Z move forward to continue the next program.

    I also want KFLOP to remember the last position of tool's number that's used when the machine is turned on after it is turned off.

    Please help me the example of C program to do the above work.
    Sorry, I'm just an electrician, and just learned about the C program.

    Really very grateful for your help.

    Regards,

    asmec





    Group: DynoMotion Message: 15348 From: AS Mechatronic Date: 1/25/2018
    Subject: Re: Fwd: Automatic Tool Changer on CNC Lathe retrofiting
    Attachments :
      Hi Tom,

      Many Thanks for your support..
      Now the machine able to do  "automatic tool change" very well.

      Regards,

      asmec

      On 19 January 2018 at 01:38, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
       

      Hi asmec,

      Note: the line shown below in the C Program defines which persist variable the program expects KMotionCNC to place the Tool Slot number to load.  The M6 command in KMotionCNC Tool Setup should be configured with the same Var Parameter to match.

      define TOOL_VAR 9          // Tool changer desired new tool Var
      HTH
      Regards
      TK

      On 1/18/2018 4:19 AM, AS Mechatronic as.mechatronic@... [DynoMotion] wrote:
       
      Hi Tom,

      Thank you for suggestion,
      I check the encoder, yes it has differentials output. But temporary I don't connect it to KANALOG. 

      Everytime I type : for example Tn M6, with 2 or 3 or 4 etc,  the same bellow message always appear : 

       
      I checked on the KMotion console, it show some information as follow :


      Before, I create a file in C:\Temp\ToolChangerData.txt, for save the last tool, and on the file I wrote 1,  is it correct ?

      It's looked like the program can not read the number of desire tool Tn.
      I dont know where is a mistake, probably it's jumped ?  .

      Much appreciate for your advice..

      Regards  
      asmec

      On 17 January 2018 at 10:51, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
       

      Hi asmec,

      I think you will need to connect the encoder to a hardware Encoder input.  Does it have differentials outputs?  See:
      http://dynomotion..com/faq.htm l#Encoders

      Have you studied this to see how much you can understand?
      http://www.dynomotion.com/wiki /index.php?title=Tool_Changer_ -_router_linear_4_Tools_-_C_ Program

      Can you identify the Functions?
      http://www.dynomotion.com/wiki /index.php?title=KFLOP_C_Progr ams#C_Functions_.28Subroutines .29

      Regards
      TK



      On 1/16/2018 4:04 AM, AS Mechatronic as.mechatronic@gmail..com [DynoMotion] wrote:
       
      Hi..

      I use KFLOP + KANALOG + KONNECT to replace the controller on my old CNC's lathe. This lathe has turret with 10 Tool's Slot.
      I want to run Automatic Toll Changer with command M6 Tx (x = number of tool). The turret works by hydraulic, to turn it only require one output (bit 150) that will enables the hydraulic's solenoid valve. A solenoid valve will move the plate to unclamp-> turning to no. tool destination-> clamp. The hydraulic mechanism allows only one-way rotation.
      On the back of the turret, there is rotary encoder (2500 pulse/rotation), supposed for detect the position when the turret was turning, I connect the A signal to Input bit 1054 and B signal to Input bit 1055.
      There is one switch on the back of the turret for detect when the plate on 'clamp' position, I connect the switch to Input bit 1051

      The working order of the Automatic Tool changer is as follows:
      - M6 Tx commands from Gcode program or MDI
      - Axis X and Axis Z move back toward a safe position
      - Output bit 150 ON
      - Wait time for t second -> t corresponds to the moving distance from the current tool to the destination tool. The time required for clamp and unclamp 0.5s and time required for  turn each slot is 0.2 second. For example, to change from tool #1 to tool #3, the total time required will be 0.9s.
      - Output bit 150 OFF
      - Axis X and Axis Z move forward to continue the next program.

      I also want KFLOP to remember the last position of tool's number that's used when the machine is turned on after it is turned off.

      Please help me the example of C program to do the above work.
      Sorry, I'm just an electrician, and just learned about the C program.

      Really very grateful for your help.

      Regards,

      asmec






      Group: DynoMotion Message: 15349 From: Tom Kerekes Date: 1/25/2018
      Subject: Re: Fwd: Automatic Tool Changer on CNC Lathe retrofiting
      Great.  Thanks for posting back.  But where is the video?  :-)

      Regards
      TK

      On 1/25/2018 5:37 AM, AS Mechatronic as.mechatronic@... [DynoMotion] wrote:
       
      Hi Tom,

      Many Thanks for your support..
      Now the machine able to do  "automatic tool change" very well.

      Regards,

      asmec

      On 19 January 2018 at 01:38, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
       

      Hi asmec,

      Note: the line shown below in the C Program defines which persist variable the program expects KMotionCNC to place the Tool Slot number to load.  The M6 command in KMotionCNC Tool Setup should be configured with the same Var Parameter to match.

      define TOOL_VAR 9          // Tool changer desired new tool Var
      HTH
      Regards
      TK